<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>07-flex的flow复合属性</title>
  <style>
    div {
      /* 给父级添加flex布局属性才能够控制子元素哦 */
      display: flex;

      /* 1. 设置 主轴方式 与 是否换行（简写）*/
      /* row: x为主轴 */
      /* wrap: 换行 */
      flex-flow: row wrap;

      width: 800px;
      height: 300px;
      margin: 0 auto;
      background-color: pink;
    }

    div span {
      width: 150px;
      height: 100px;
      margin: 10px;
      background: skyblue;
    }
  </style>
</head>

<body>
  <div>
    <span>1</span>
    <span>2</span>
    <span>3</span>
    <span>4</span>
    <span>5</span>
    <span>6</span>
    <span>7</span>
    <span>8</span>
  </div>

</body>

</html>